/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tuitionmanagement.DAO;

import tuitionmanagement.entity.Role;
import java.util.ArrayList;

/**
 *
 * @author lab
 */
public class RoleFee {

    private RoleDAO dao;
    private String lastError;

    public RoleFee() {
        dao = new RoleDAO();
    }

    /**
     * Read by all Accounts
     * @return
     */
    public ArrayList<Role> readByAll() {
        return dao.readByAll();
    }

    /**
     * New Account
     * @param account
     * @return boolean
     */
    public boolean create(Role role) {
        return dao.create(role);
    }

    /**
     * Update Account
     * @param account
     * @return boolean
     */
    public boolean store(Role role) {
        return dao.update(role);
    }

//    public boolean authencicate(Role role) {
//        return dao..authencicate(role);
//    }

    /**
     * Remove Account
     * @param accountID
     * @return
     */
//<<<<<<< .mine
//    public boolean remove(int roleId) {
//        return dao.delete(roleId);
//    }
//=======
//    public boolean remove(int role) {
//        return dao.delete(role);
//    }
//>>>>>>> .r85

    /**
     * Change password for current account
     * @param acc
     * @param oldPass
     * @return boolean
     */
//    public boolean changePass(Role role, String oldPass) {
//        return dao.changePass(role, oldPass);
//    }

    /**
     * @return the lastError
     */
    public String getLastError() {
        return dao.getLastError();
    }

    /**
     * @param lastError the lastError to set
     */
    public void setLastError(String lastError) {
        this.lastError = lastError;
    }
}
